<?php
use Illuminate\Http\Request;
use Illuminate\Routing\Router;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::namespace('Api')->group(function (Router $router){

    //RSA demo
    $router->namespace('RSA')->group(function ($router){
        $router->any('rsa/sign','RSAController@sign')->name('api.rsa.sign');
        $router->any('rsa/check_sign','RSAController@checkSign')->name('api.rsa.check_sign');
        $router->any('rsa/encrypt','RSAController@encrypt')->name('api.rsa.encrypt');
        $router->any('rsa/decrypt','RSAController@decrypt')->name('api.rsa.decrypt');
    });

    $router->namespace('ORMObservers')->group(function ($router){
        $router->any('observere/index','ObserverController@index')->name('api.observere.index');
    });


});

